<?php
include 'user_class.php';
if ($_GET['action']=='logout') {
	user::logout();
}
if (isset($_POST['username'])) {
	if (user::login($_POST['username'],$_POST['password'])) {
		Header( "HTTP/1.1 301 Moved Permanently" );
		Header('Location: auth_test.php');			
	} else {
		die ('login wrong!<br><a href="login.php">return</a>');
	}
}
?>
<form action='login.php' method='post'>
<input type='text' name='username' /><br />
<input type='password' name='password' /><br />
<input type='submit' name='go' value='go'/>
<br />
</form>